if __name__=="__main__":
    n=int(input())
    count=0
    while n!=0:
        rem=n%2
        if rem==1:
            count+=1
        n=int(n/2)
    print(count)
